/* ===== 左侧用户卡片调整 ===== */
/* 用户信息卡片 */
.user-info-card {
    padding-bottom: 1.5rem;
}


/* 统计数字区域 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.stats-item {
    text-align: center;
    padding: 0.75rem;
    background-color: var(--gray-100);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.stats-item:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(91, 95, 255, 0.15);
}

.stats-item:hover .stats-number,
.stats-item:hover .stats-label {
    color: white;
}

.stats-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.stats-label {
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* 好友管理菜单 */
.friend-menu {
    margin-bottom: 1.5rem;
}

.friend-menu-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.friend-menu-item:hover {
    background-color: var(--gray-100);
    transform: translateX(4px);
}

.friend-menu-icon {
    width: 1.25rem;
    text-align: center;
    color: var(--primary);
    margin-right: 0.75rem;
}

.friend-menu-text {
    flex: 1;
    font-size: 0.875rem;
}

.friend-menu-badge {
    background-color: var(--primary-light);
    color: white;
    font-size: 0.6875rem;
    padding: 0.125rem 0.5rem;
    border-radius: 1rem;
}

/* ===== 中间发布区域调整 ===== */
/* 发布卡片 - 模仿微信朋友圈 */
.post-creator-card {
    margin-bottom: 1.5rem;
    border-radius: 1rem;
    overflow: hidden;
}

.post-input-area {
    display: flex;
    padding: 1rem;
}

.post-avatar {
    flex: 0 0 3rem;
    margin-right: 1rem;
}

.post-textarea {
    flex: 1;
    min-height: 5rem;
    padding: 0.75rem;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    resize: none;
    transition: all 0.3s ease;
}

.post-textarea:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(91, 95, 255, 0.2);
    outline: none;
}

.post-actions {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--gray-100);
}

.post-action-btn {
    display: flex;
    align-items: center;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    color: var(--gray-600);
    transition: all 0.3s ease;
}

.post-action-btn:hover {
    background-color: var(--gray-100);
    color: var(--primary);
}

.post-action-icon {
    margin-right: 0.5rem;
    font-size: 1.25rem;
}

/* 图片预览区域 */
.image-preview-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    padding: 0 1rem 1rem;
}

.image-preview-item {
    position: relative;
    border-radius: 0.5rem;
    overflow: hidden;
    aspect-ratio: 1/1;
}

.image-preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.image-remove-btn {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    width: 1.5rem;
    height: 1.5rem;
    background-color: rgba(0, 0, 0, 0.5);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-preview-item:hover .image-remove-btn {
    opacity: 1;
}

/* ===== 右侧推荐区域调整 ===== */
/* 推荐卡片统一样式 */
.recommend-card {
    margin-bottom: 1.5rem;
    border-radius: 1rem;
}

.recommend-card-header {
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--gray-100);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.recommend-card-title {
    font-weight: 600;
    color: gray;
}

.recommend-card-more {
    font-size: 0.875rem;
    color: var(--primary);
}

.recommend-card-body {
    padding: 0.75rem;
}

/* 推荐好友项 */
.recommend-friend-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.recommend-friend-item:hover {
    background-color: var(--gray-100);
}

.recommend-friend-avatar {
    flex: 0 0 2.5rem;
    margin-right: 0.75rem;
}

.recommend-friend-info {
    flex: 1;
    min-width: 0;
}

.recommend-friend-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.recommend-friend-mutual {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.recommend-friend-btn {
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--primary);
    background-color: var(--primary-light);
    transition: all 0.3s ease;
}

.recommend-friend-btn:hover {
    background-color: var(--primary);
    color: white;
}

/* 热门话题项 */
.topic-item {
    padding: 0.75rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.topic-item:hover {
    background-color: var(--gray-100);
}

.topic-name {
    font-weight: 500;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
}

.topic-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* 活跃用户项 */
.active-user-item {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.active-user-item:hover {
    background-color: var(--gray-100);
}

.active-user-avatar {
    flex: 0 0 2.5rem;
    margin-right: 0.75rem;
    position: relative;
}

.active-user-status {
    position: absolute;
    bottom: 0;
    right: 0;
    width: 0.75rem;
    height: 0.75rem;
    border-radius: 50%;
    border: 2px solid white;
    background-color: var(--success);
}

.active-user-info {
    flex: 1;
    min-width: 0;
}

.active-user-name {
    font-weight: 500;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.active-user-activity {
    display: flex;
    align-items: center;
    font-size: 0.75rem;
    color: var(--gray-500);
}

.active-user-score {
    margin-left: 0.25rem;
    color: var(--warning);
}

.active-user-follow-btn {
    flex: 0 0 2rem;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: var(--primary);
    background-color: var(--primary-light);
    transition: all 0.3s ease;
}

.active-user-follow-btn:hover {
    background-color: var(--primary);
    color: white;
}




/* ===== 花哨的登录/注册页面样式（优化版） ===== */
.auth-container {
    max-width: 500px;
    margin: 2rem auto;
    padding: 0 1rem;
}

.auth-card {
    background: linear-gradient(145deg, #ffffff, #f8f9fa);
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(10px);
    position: relative;
    z-index: 1;
}

.auth-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(91, 95, 255, 0.2);
}

.auth-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, transparent 20%, var(--primary-light) 150%);
    z-index: -1;
    opacity: 0.1;
}

.auth-header {
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
    color: white;
    padding: 1.75rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.auth-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 0%, rgba(255,255,255,0.1) 100%);
}

.auth-title {
    font-weight: 700;
    font-size: 1.75rem;
    margin: 0;
    position: relative;
    letter-spacing: 1px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.auth-body {
    padding: 2.5rem 2rem;
}

.auth-alert {
    border-radius: 0.75rem;
    padding: 1rem;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
    position: relative;
    overflow: hidden;
    border: none;
    display: none; /* 默认隐藏 */
    animation: alertSlideIn 0.5s ease-out forwards;
}

@keyframes alertSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auth-alert.show {
    display: block;
}

.auth-alert::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
}

.auth-alert-success {
    background-color: rgba(40, 167, 69, 0.15);
    color: #28a745;
}

.auth-alert-success::before {
    background-color: #28a745;
}

.auth-alert-danger {
    background-color: rgba(220, 53, 69, 0.15);
    color: #dc3545;
}

.auth-alert-danger::before {
    background-color: #dc3545;
}

.auth-form-group {
    margin-bottom: 1.5rem;
    position: relative;
}

.auth-form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--gray-700);
    position: relative;
    padding-left: 1.5rem;
}

.auth-form-label::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 1rem;
    height: 1rem;
    background-color: var(--primary-light);
    border-radius: 4px;
    opacity: 0.5;
}

.auth-form-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border: 2px solid var(--gray-200);
    border-radius: 0.85rem;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: rgba(255,255,255,0.8);
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.auth-form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(91, 95, 255, 0.25), inset 0 1px 3px rgba(0,0,0,0.05);
    background-color: white;
}

.auth-form-input::placeholder {
    color: var(--gray-500);
    font-style: italic;
}

/* 按钮样式 */
.auth-btn {
    display: block;
    width: 100%;
    padding: 1rem;
    text-align: center;
    border-radius: 0.85rem;
    font-weight: 700;
    font-size: 1.1rem;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.auth-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
    z-index: -1;
    transition: transform 0.5s ease;
    transform: scaleX(0);
    transform-origin: left;
}

.auth-btn:hover::before {
    transform: scaleX(1);
}

.auth-btn-primary {
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
    color: white;
    box-shadow: 0 4px 15px rgba(91, 95, 255, 0.3);
}

.auth-btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(91, 95, 255, 0.4);
}

.auth-btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.auth-btn-outline::before {
    background: linear-gradient(to right, var(--primary), var(--primary-dark));
}

.auth-btn-outline:hover {
    color: white;
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 7px 20px rgba(91, 95, 255, 0.3);
}

.auth-link-container {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--gray-600);
}

.auth-link {
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    position: relative;
    transition: all 0.3s ease;
    padding: 0.25rem 0.5rem;
    border-radius: 0.5rem;
}

.auth-link:hover {
    background-color: var(--primary-light);
    color: var(--primary-dark);
}

/* 注册页特定样式 */
.reg-row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -0.75rem;
}

.reg-col {
    flex: 1;
    padding: 0 0.75rem;
    min-width: 250px;
}

.reg-radio-group {
    display: flex;
    gap: 1rem;
    margin-top: 0.5rem;
}

.reg-radio-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 0.75rem;
    background-color: rgba(91, 95, 255, 0.05);
    transition: all 0.3s ease;
}

.reg-radio-item:hover {
    background-color: rgba(91, 95, 255, 0.1);
}

.reg-radio-item input[type="radio"] {
    appearance: none;
    width: 18px;
    height: 18px;
    border: 2px solid var(--gray-400);
    border-radius: 50%;
    transition: all 0.2s ease;
    position: relative;
}

.reg-radio-item input[type="radio"]:checked {
    border-color: var(--primary);
    background-color: var(--primary);
}

.reg-radio-item input[type="radio"]:checked::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
}

.reg-hint {
    font-size: 0.8rem;
    color: var(--gray-500);
    margin-top: 0.25rem;
    display: block;
    padding-left: 1.5rem;
    font-style: italic;
}

/* 背景装饰和动画 */
body.auth-body-bg {
    background: linear-gradient(135deg, #f5f7fa 0%, #e4edf5 100%);
    min-height: 100vh;
    padding: 2rem 0;
    overflow-x: hidden;
    position: relative;
}

/* 浮动背景元素 */
.floating-bg-element {
    position: fixed;
    border-radius: 50%;
    z-index: -1;
    filter: blur(50px);
    opacity: 0.15;
    animation: floatAnimation 20s ease-in-out infinite;
}

.floating-bg-element:nth-child(1) {
    width: 300px;
    height: 300px;
    background: var(--primary);
    top: 10%;
    left: 10%;
    animation-delay: 0s;
}

.floating-bg-element:nth-child(2) {
    width: 250px;
    height: 250px;
    background: var(--warning);
    bottom: 15%;
    right: 15%;
    animation-delay: 5s;
}

.floating-bg-element:nth-child(3) {
    width: 200px;
    height: 200px;
    background: var(--success);
    top: 40%;
    right: 20%;
    animation-delay: 10s;
}

.floating-bg-element:nth-child(4) {
    width: 180px;
    height: 180px;
    background: var(--primary-dark);
    bottom: 30%;
    left: 20%;
    animation-delay: 15s;
}


/* 背景浮动动画 */
@keyframes floatAnimation {
    0% {
        transform: translate(0, 0) rotate(0deg);
    }
    25% {
        transform: translate(50px, 50px) rotate(90deg);
    }
    50% {
        transform: translate(100px, 0) rotate(180deg);
    }
    75% {
        transform: translate(50px, -50px) rotate(270deg);
    }
    100% {
        transform: translate(0, 0) rotate(360deg);
    }
}

/* 统一所有头像为圆形样式 */
.avatar-sm,
.friend-avatar-32,
.rounded-circle.avatar-sm,
.list-group-item img {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border: 1px solid #eee;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border-radius: 50% !important; /* 修改为完全圆形 */
}

/* 保留原有样式 */
.friend-avatar-32 {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border: 1px solid #eee;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.avatar-sm {
    width: 32px;
    height: 32px;
    object-fit: cover;
    border: 1px solid #eee;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 其他原有样式保持不变... */

/* 头像样式 */
.avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* 图片网格样式 */
.post-images {
    margin-top: 12px;
}

.post-images img {
    border-radius: 8px;
    transition: transform 0.3s ease;
}

/* 操作按钮悬停效果 */
.like-btn:hover i, .comment-btn:hover i, .share-btn:hover i {
    transform: scale(1.1);
}

/* 默认头像 */
.default-avatar {
    background-color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
    font-weight: bold;
}

/* 头像样式 */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.post-header .user-avatar-container img.user-avatar {
    width: 40px !important;
    height: 40px !important;
    min-width: 40px;
    min-height: 40px;
    max-width: 40px;
    max-height: 40px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

/* 日志图片样式 */
.post-images img {
    width: 100%;
    height: 200px; /* 固定高度 */
    object-fit: cover; /* 保持比例并裁剪 */
    border-radius: 8px;
    margin-bottom: 8px;
}

/* 头像样式 */
.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff;
}